<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>车辆调度</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="../plugins/layui/css/layui.css" media="all" />
    <link rel="stylesheet" href="../plugins/layui/css/myPage.css">
</head>
<body class="layui-layout-body">


<blockquote class="layui-elem-quote"  >
    <div class=" layui-form" >
        <div class="layui-form-item"  >


            <div class="layui-input-inline" style="width: 100px">
                <select name="" lay-verify="required" id="khSearchKind" lay-filter="khSearchKind" >
                    <option value="khjc">客户简称</option>
                    <option value="khzjm">助记码</option>
                </select>

                <select name="" lay-filter="dingdan" id="ddSearchKind" >
                    <option value="ydzt">运单状态</option>
                    <option value="ydh">运单号</option>
                </select>
            </div>
            <div class="layui-input-inline">
                <select   class="layui-input" id="khSearchContent" lay-search> <option value="">请选择</option></select>

                <div id="ydh" style="display: none" ><select   class="layui-input"  id="ydhSearchContent" lay-search><option value="">请选择</option></select></div>
                <div id="ydzt"  >
                    <select name=""   id="ddSearchContent">
                        <option value="">选择运单状态</option>
                        <option value="已报">已报</option>
                        <option value="审核中">审核中</option>
                    </select>
                </div>
            </div>



            <div class="layui-input-inline" style="width: 100px">
                <select name="city"  id="xlSearchKind" lay-filter="xlSearchKind" >
                    <option value="xlmc">线路名称</option>
                    <option value="xlzjm">助记码</option>
                </select>
                <select name="city" lay-verify="required" id="qySearchKind" lay-filter="qySearchKind">
                    <option value="qymc">区域名称</option>
                    <option value="qyzjm">助记码</option>
                </select>
            </div>

            <div class="layui-input-inline">
                <select   class="layui-input" id="xlSearchContent" lay-search> <option value="">请选择</option></select>
                <select   class="layui-input" id="qySearchContent" lay-search> <option value="">请选择</option></select>

            </div>

            <div class="layui-input-inline" style="width: 100px">
                <label class="layui-form-label">运单起始日期</label>
                <label class="layui-form-label">运单结束日期</label>
            </div>
            <div class="layui-input-inline">
                <input type="text"  class="layui-input"   id="searchQsrqContent">
                <input type="text"  class="layui-input" id="searchJsrqContent">
            </div>


            <div class="layui-input-inline" style="width: 80px">
                <button class="layui-btn layui-btn-normal" id="search">点击搜索</button>
                <button type="button" class="layui-btn layui-btn-normal" id="all">显示全部</button>
            </div>



            <div class="layui-input-inline " style=" width:10%; position: absolute;right: 0 ">
                <button type="button" class="layui-btn layui-btn-normal" id="newQuickWayBill">新增快捷运单</button>
            </div>


        </div>
    </div>
</blockquote>
<div class="layui-row">
    <div class="layui-col-xs12">



        <script type="text/html" id="opera">

            {{#  if(d.ydzt == '已回车'){ }}
            <button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="detail">查看</button>
            <button class="layui-btn layui-btn-normal layui-btn-xs layui-btn-disabled" disabled="disabled" lay-event="posterror">退回</button>


            {{# }else if(d.ydzt == '已完成'){ }}
            <button class="layui-btn layui-btn-normal layui-btn-xs " lay-event="detail">查看</button>
            <button class="layui-btn layui-btn-normal layui-btn-xs " lay-event="posterror">退回</button>


            {{# }else if(d.ydzt.split('_')[1] == '审核中'){ }}
            <button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="detail" >查看</button>
            <button class="layui-btn layui-btn-normal layui-btn-xs " lay-event="posterror">退回</button>
            {{# }else { }}
            <button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="detail" >查看</button>
            <button class="layui-btn layui-btn-normal layui-btn-xs " lay-event="posterror">退回</button>
            {{# } }}
        </script>
        <table id="table" lay-filter="Table"></table>
        <script type="text/html" id="selectTpl_type">
            {{d.cph}}
        </script>

        <script type="text/html" id="zzc">
            {{# console.log(d) }}
            {{# if(d.zzc > d.zcsx){ }}
             <div style="background:red;">{{d.zzc}}</div>
            {{# } else { }}
                 {{d.zzc}}
            {{# } }}
        </script>
        <script type="text/html" id="ydztfix">
            {{# if(d.ydzt.indexOf('_') != -1){ }}
            {{d.ydzt.split('_')[1]}}
            {{#   }else{ }}
            {{d.ydzt }}
            {{# } }}
        </script>
    </div>
</div>





<script src="../plugins/layui/layui.js"></script>
<script src="../js/config.js"></script>
<script src="../js/tools.js"></script>
<script>
    //JavaScript代码区域
    layui.use(['form' ,'table','jquery','layer','element','laydate'], function(){
        var form = layui.form;
        var table = layui.table;
        var $ = layui.$;
        var element = layui.element;
        var layer = layui.layer;
        var laydate = layui.laydate;
        var tableheight=  'full-130';
        var tablewidth = 90;
        var currentPage = 1;
        var cphData=[];
        var elemNull = {};
        // elemNull.value = "&nbsp";
        // elemNull.text = "&nbsp";
        // cphData[0] = elemNull;

        //获取 cphData
        $.ajax({
            url: contextPath+"/car",
            type: "GET",
            contentType:"application/json;charset=utf-8",
            dataType:"json",
            success: function(res) {
                for(var i in res.list){
                    var elem = {};
                    elem.value = res.list[i].clid;
                    elem.text = res.list[i].cph;
                    cphData[i+1] = elem;
                }


            }

        });

        //搜索的运单状态还是运单号
        form.on('select(dingdan)',function (data) {
            if(data.value == "ydh"){
                $("#ydzt").css("display","none");
                $("#ydh").css("display","block");
                $.ajax({
                    url: contextPath+"/waybill?bd=kj",
                    type: "GET",
                    contentType:"application/json;charset=utf-8",
                    dataType:"json",
                    success: function(res) {
                        $("#ydhSearchContent").empty();
                        $("#ydhSearchContent").append("<option value=''>请选择</option>");
                        for(var i in res.list){
                            var option = "<option value='"+ res.list[i].ydh+ "'>"+res.list[i].ydh+"</option>";
                            $("#ydhSearchContent").append(option);
                        };
                        form.render('select');
                    }
                });
            }else if(data.value == "ydzt"){
                $("#ydh").css("display","none");
                $("#ydzt").css("display","block");

            }
        });

        //  渲染搜索 select
        yewuSearch(form,$);
//新增
        $("#newQuickWayBill").on("click",function () {
            layer.open({
                cancel: function(index, layero){
                    var faIndex = index;
                    layer.confirm('确定要关闭么?未保存的信息将会丢失!', {icon: 3, title:'提示'}, function(index){
                        //do something
                        layer.close(index);
                        layer.close(faIndex);
                    });
                    return false
                },
                type: 2,
                title: '新建快捷运单',
                maxmin: true,
                //点击遮罩关闭层
                area : ['1200px' , '800px'],
                content: ['./newQuickWayBill.html'],

                end:function(){
                    $.ajax({
                        url: contextPath+"/waybill?bd=kj",
                        type: "GET",
                        contentType:"application/json;charset=utf-8",
                        dataType:"json",
                        success: function(res) {
                            table.render({
                                elem: '#table'
                                ,height:tableheight
                                ,data:res.list
                                ,page: {
                                    curr: currentPage //重新从第 1 页开始
                                } //开启分页
                                ,limit:10
                                ,id:'table'
                                ,cellMinWidth: tablewidth
                                ,cols: [[ //表头
                                    {type:'numbers', title: '序号',  align:'center'}
                                    ,{field: 'ydh', title: '运单号' ,align:'center'}
                                     ,{field: 'ydzt',templet:'#ydztfix' ,title: '运单状态',align:'center'}

                                    ,{field: 'khjc', title: '客户简称' ,  align:'center'}

                                    ,{field: 'qymc', title: '区域名称' ,  align:'center'}
                                    ,{field: 'xlmc', title: '线路名称' ,  align:'center'}
                                    ,{field: 'ydrq', title: '运单日期' ,align:'center'}
                                    ,{field: 'bzrq', title: '报账日期' ,align:'center'}
                                    ,{field:'cph',templet: '#selectTpl_type', title: '车牌号' ,align:'center',event: 'cph' , }
                                    ,{field: 'cllx', title: '车辆类型' ,align:'center'}
                                    ,{field: 'jsyxm', title: '驾驶员' ,align:'center'}
                                    ,{field: 'jsysj', title: '驾驶员手机' ,align:'center'}
                                    ,{field: 'zcsx', title: '支出上限' ,align:'center'}
                                    ,{field: 'zsr', title: '总收入' ,align:'center'}
                                    ,{field: 'zzc', title: '总支出' ,align:'center',templet:"#zzc"}
                                    ,{ title:'操作', align:'center', toolbar: '#opera',width:150}
                                ]]

                                ,done: function(res, curr, count){
                                    //得到当前页码
                                    console.log(curr);
                                    currentPage = curr;
                                }
                            });
                        }

                    });
                }
            });

        });
        //执行一个laydate实例
        laydate.render({
            elem: '#ydrq' //指定元素
            ,format:'yyyy-MM-dd'
            ,theme:'#0099FF'

        });
        laydate.render({
            elem: '#searchQsrqContent' //指定元素
            ,format:'yyyy-MM-dd'
            ,theme:'#0099FF'
        });
        laydate.render({
            elem: '#searchJsrqContent' //指定元素
            ,format:'yyyy-MM-dd'
            ,theme:'#0099FF'

        });



//请求车牌号




        //刷新table实例
        $("#all").on('click',function () {
            $.ajax({
                url: contextPath+"/waybill?bd=kj",
                type: "GET",
                contentType:"application/json;charset=utf-8",
                dataType:"json",
                success: function(res) {
                    table.render({
                        elem: '#table'
                        ,height:tableheight
                        ,data:res.list
                        ,page: {
                            curr: currentPage //重新从第 1 页开始
                        } //开启分页
                        ,limit:10
                        ,id:'table'
                        ,cellMinWidth: tablewidth
                        ,cols: [[ //表头
                            {type:'numbers', title: '序号',  align:'center'}
                            ,{field: 'ydh', title: '运单号' ,align:'center'}
                             ,{field: 'ydzt',templet:'#ydztfix' ,title: '运单状态',align:'center'}

                            ,{field: 'khjc', title: '客户简称' ,  align:'center'}

                            ,{field: 'qymc', title: '区域名称' ,  align:'center'}
                            ,{field: 'xlmc', title: '线路名称' ,  align:'center'}
                            ,{field: 'ydrq', title: '运单日期' ,align:'center'}
                            ,{field: 'bzrq', title: '报账日期' ,align:'center'}
                            ,{field:'cph',templet: '#selectTpl_type', title: '车牌号' ,align:'center',event: 'cph' , }
                            ,{field: 'cllx', title: '车辆类型' ,align:'center'}
                            ,{field: 'jsyxm', title: '驾驶员' ,align:'center'}
                            ,{field: 'jsysj', title: '驾驶员手机' ,align:'center'}
                            ,{field: 'zcsx', title: '支出上限' ,align:'center'}
                            ,{field: 'zsr', title: '总收入' ,align:'center'}
                            ,{field: 'zzc', title: '总支出' ,align:'center',templet:"#zzc"}
                            ,{ title:'操作', align:'center', toolbar: '#opera',width:150}
                        ]]

                        ,done: function(res, curr, count){
                            //得到当前页码
                            console.log(curr);
                            currentPage = curr;
                        }
                    });
                }

            });

        });

        $.ajax({
            url: contextPath+"/waybill?bd=kj",
            type: "GET",
            contentType:"application/json;charset=utf-8",
            dataType:"json",
            success: function(res) {
                table.render({
                    elem: '#table'
                    ,height:tableheight
                    ,data:res.list
                    ,page: {
                        curr: currentPage //重新从第 1 页开始
                    } //开启分页
                    ,limit:10
                    ,id:'table'
                    ,cellMinWidth: tablewidth
                    ,cols: [[ //表头
                        {type:'numbers', title: '序号',  align:'center'}
                        ,{field: 'ydh', title: '运单号' ,align:'center'}
                         ,{field: 'ydzt',templet:'#ydztfix' ,title: '运单状态',align:'center'}

                        ,{field: 'khjc', title: '客户简称' ,  align:'center'}

                        ,{field: 'qymc', title: '区域名称' ,  align:'center'}
                        ,{field: 'xlmc', title: '线路名称' ,  align:'center'}
                        ,{field: 'ydrq', title: '运单日期' ,align:'center'}
                        ,{field: 'bzrq', title: '报账日期' ,align:'center'}
                        ,{field:'cph',templet: '#selectTpl_type', title: '车牌号' ,align:'center',event: 'cph' , }
                        ,{field: 'cllx', title: '车辆类型' ,align:'center'}
                        ,{field: 'jsyxm', title: '驾驶员' ,align:'center'}
                        ,{field: 'jsysj', title: '驾驶员手机' ,align:'center'}
                        ,{field: 'zcsx', title: '支出上限' ,align:'center'}
                        ,{field: 'zsr', title: '总收入' ,align:'center'}
                        ,{field: 'zzc', title: '总支出' ,align:'center',templet:"#zzc"}
                        ,{ title:'操作', align:'center', toolbar: '#opera',width:150}
                    ]]

                    ,done: function(res, curr, count){
                        //得到当前页码
                        console.log(curr);
                        currentPage = curr;
                    }
                });
            }

        });


        table.on('tool(Table)', function(obj){ //注：tool是工具条事件名，test是table原始容器的属性 lay-filter="对应的值"
            var data = obj.data //获得当前行数据
                ,layEvent = obj.event; //获得 lay-event 对应的值
            if(obj.data.ydzt == "调度_审核中" || obj.data.ydzt == "快捷_审核中" || obj.data.ydzt == "报账_审核中" || obj.data.ydzt == "登记_审核中"){
                obj.data.ydzt = "审核中";
            }
            if(obj.data.ydzt == "快捷_已完成"){
                obj.data.ydzt = "已完成";
            }
            console.log(obj.data);
            if(layEvent === 'detail'){
                layer.open({
                    // cancel: function(index, layero){
                    //     var faIndex = index;
                    //     if(obj.data.ydzt != "已完成" && obj.data.ydzt != "审核中"){
                    //
                    //         layer.confirm('确定要关闭么?未保存的信息将会丢失!', {icon: 3, title:'提示'}, function(index){
                    //             //do something
                    //             layer.close(index);
                    //             layer.close(faIndex);
                    //         });
                    //     }else {
                    //         layer.close(faIndex);
                    //     }
                    //
                    //     return false
                    // },
                    type: 2,
                    title: '查看运单信息',
                    maxmin: true,
                    //点击遮罩关闭层
                    shadeClose:false,
                    area : ['1200px' , '800px'],
                    content: ['./lookQuickWayBill.html'],
                    success:function(layero,index){
                        console.log(data);
                        var body = layer.getChildFrame('body',index);

                        for(var i in data){
                            body.contents().find("[name='"+i+"']").val(eval("data."+i));
                        }
                    },
                    end:function(){
                        $.ajax({
                            url: contextPath+"/waybill?bd=kj",
                            type: "GET",
                            contentType:"application/json;charset=utf-8",
                            dataType:"json",
                            success: function(res) {
                                table.render({
                                    elem: '#table'
                                    ,height:tableheight
                                    ,data:res.list
                                    ,page: {
                                        curr: currentPage //重新从第 1 页开始
                                    } //开启分页
                                    ,limit:10
                                    ,id:'table'
                                    ,cellMinWidth: tablewidth
                                    ,cols: [[ //表头
                                        {type:'numbers', title: '序号',  align:'center'}
                                        ,{field: 'ydh', title: '运单号' ,align:'center'}
                                         ,{field: 'ydzt',templet:'#ydztfix' ,title: '运单状态',align:'center'}

                                        ,{field: 'khjc', title: '客户简称' ,  align:'center'}

                                        ,{field: 'qymc', title: '区域名称' ,  align:'center'}
                                        ,{field: 'xlmc', title: '线路名称' ,  align:'center'}
                                        ,{field: 'ydrq', title: '运单日期' ,align:'center'}
                                        ,{field: 'bzrq', title: '报账日期' ,align:'center'}
                                        ,{field:'cph',templet: '#selectTpl_type', title: '车牌号' ,align:'center',event: 'cph' , }
                                        ,{field: 'cllx', title: '车辆类型' ,align:'center'}
                                        ,{field: 'jsyxm', title: '驾驶员' ,align:'center'}
                                        ,{field: 'jsysj', title: '驾驶员手机' ,align:'center'}
                                        ,{field: 'zcsx', title: '支出上限' ,align:'center'}
                                        ,{field: 'zsr', title: '总收入' ,align:'center'}
                                        ,{field: 'zzc', title: '总支出' ,align:'center',templet:"#zzc"}
                                        ,{ title:'操作', align:'center', toolbar: '#opera',width:150}
                                    ]]

                                    ,done: function(res, curr, count){
                                        //得到当前页码
                                        console.log(curr);
                                        currentPage = curr;
                                    }
                                });
                            }

                        });
                    }
                });



            }else if(layEvent === 'posterror') {

                layer.open({
                    cancel: function (index, layero) {
                        var faIndex = index;
                        layer.confirm('确定要关闭么?未保存的信息将会丢失!', {icon: 3, title: '提示'}, function (index) {
                            //do something
                            layer.close(index);
                            layer.close(faIndex);
                        });
                        return false
                    },
                    type: 2,
                    title: '退回',
                    maxmin: true,
                    //点击遮罩关闭层
                    area: ['1200px', '450px'],
                    content: ['./postErrorkj.html', 'no'],
                    success: function (layero, index) {
                        console.log(data);
                        var body = layer.getChildFrame('body', index);

                        for (var i in data) {
                            body.contents().find("[name='" + i + "']").val(eval("data." + i));
                        }
                    },
                    end: function () {
                        $.ajax({
                            url: contextPath + "/waybill?bd=kj",
                            type: "GET",
                            contentType: "application/json;charset=utf-8",
                            dataType: "json",
                            success: function (res) {
                                table.render({
                                    elem: '#table'
                                    , height: tableheight
                                    , data: res.list
                                    , page: {
                                        curr: currentPage //重新从第 1 页开始
                                    } //开启分页
                                    , limit: 10
                                    , id: 'table'
                                    , cellMinWidth: tablewidth
                                    , cols: [[ //表头
                                        {type:'numbers', title: '序号',  align:'center'}
                                        ,{field: 'ydh', title: '运单号' ,align:'center'}
                                         ,{field: 'ydzt',templet:'#ydztfix' ,title: '运单状态',align:'center'}

                                        ,{field: 'khjc', title: '客户简称' ,  align:'center'}

                                        ,{field: 'qymc', title: '区域名称' ,  align:'center'}
                                        ,{field: 'xlmc', title: '线路名称' ,  align:'center'}
                                        ,{field: 'ydrq', title: '运单日期' ,align:'center'}
                                        ,{field: 'bzrq', title: '报账日期' ,align:'center'}
                                        ,{field:'cph',templet: '#selectTpl_type', title: '车牌号' ,align:'center',event: 'cph' , }
                                        ,{field: 'cllx', title: '车辆类型' ,align:'center'}
                                        ,{field: 'jsyxm', title: '驾驶员' ,align:'center'}
                                        ,{field: 'jsysj', title: '驾驶员手机' ,align:'center'}
                                        ,{field: 'zcsx', title: '支出上限' ,align:'center'}
                                        ,{field: 'zsr', title: '总收入' ,align:'center'}
                                        ,{field: 'zzc', title: '总支出' ,align:'center',templet:"#zzc"}
                                        ,{ title:'操作', align:'center', toolbar: '#opera',width:150}
                                    ]]

                                    , done: function (res, curr, count) {
                                        //得到当前页码
                                        console.log(curr);
                                        currentPage = curr;
                                    }
                                });
                            }

                        });
                    }
                });
            }

        });

        // table.on('edit(Table)', function(obj){ //注：edit是固定事件名，test是table原始容器的属性 lay-filter="对应的值"
        //
        //     console.log(obj);
        // });



//搜索
        $("#search").on('click',function(){
            if($("#searchQsrqContent").val() != "" && $("#searchJsrqContent").val() != ""){
                if(!checkEndTime($("#searchQsrqContent").val(),$("#searchJsrqContent").val())){
                    layer.msg("起始日期小于结束日期!");
                }else {
                    var url = contextPath+"/waybill?bd=kj&"+$("#khSearchKind").val()+"="+$("#khSearchContent").val()+"&"+$("#xlSearchKind").val()+"="+$("#xlSearchContent").val()+"&"+$("#qySearchKind").val()+"="+$("#qySearchContent").val()+"&"+"ydzt"+"="+$("#ddSearchContent").val().toString()+ "&ydh="+ $("#ydhSearchContent").val()+"&qsrq="+$("#searchQsrqContent").val()+"&"+"jsrq="+$("#searchJsrqContent").val();
                    console.log(url);
                    $.ajax({
                        url: url,
                        type: "GET",
                        contentType:"application/json;charset=utf-8",
                        dataType:"json",
                        success: function(res) {
                            table.render({
                                elem: '#table'
                                ,height:tableheight
//                    ,url:  contextPath+"/"//数据接口
                                ,data:res.list
                                ,page: true //开启分页
                                ,limit:10
                                ,cellMinWidth: tablewidth
                                ,cols: [[ //表头
                                    {type:'numbers', title: '序号',  align:'center'}
                                    ,{field: 'ydh', title: '运单号' ,align:'center'}
                                     ,{field: 'ydzt',templet:'#ydztfix' ,title: '运单状态',align:'center'}

                                    ,{field: 'khjc', title: '客户简称' ,  align:'center'}

                                    ,{field: 'qymc', title: '区域名称' ,  align:'center'}
                                    ,{field: 'xlmc', title: '线路名称' ,  align:'center'}
                                    ,{field: 'ydrq', title: '运单日期' ,align:'center'}
                                    ,{field: 'bzrq', title: '报账日期' ,align:'center'}
                                    ,{field:'cph',templet: '#selectTpl_type', title: '车牌号' ,align:'center',event: 'cph' , }
                                    ,{field: 'cllx', title: '车辆类型' ,align:'center'}
                                    ,{field: 'jsyxm', title: '驾驶员' ,align:'center'}
                                    ,{field: 'jsysj', title: '驾驶员手机' ,align:'center'}
                                    ,{field: 'zcsx', title: '支出上限' ,align:'center'}
                                    ,{field: 'zsr', title: '总收入' ,align:'center'}
                                    ,{field: 'zzc', title: '总支出' ,align:'center',templet:"#zzc"}
                                    ,{ title:'操作', align:'center', toolbar: '#opera',width:150}
                                ]]
                            });
                        }
                    });
                }
            }else if($("#searchQsrqContent").val() != "" && $("#searchJsrqContent").val() == ""){
                layer.msg("结束日期不能为空！");
            }else if($("#searchQsrqContent").val() == "" && $("#searchJsrqContent").val() != ""){
                layer.msg("起始日期不能为空！");
            }else {


                var url = contextPath+"/waybill?bd=kj&"+$("#khSearchKind").val()+"="+$("#khSearchContent").val()+"&"+$("#xlSearchKind").val()+"="+$("#xlSearchContent").val()+"&"+$("#qySearchKind").val()+"="+$("#qySearchContent").val()+"&"+"ydzt"+"="+$("#ddSearchContent").val()+ "&ydh="+ $("#ydhSearchContent").val();
                console.log(url);
                $.ajax({
                    url: url,
                    type: "GET",
                    contentType:"application/json;charset=utf-8",
                    dataType:"json",
                    success: function(res) {
                        table.render({
                            elem: '#table'
                            ,height:tableheight
//                    ,url:  contextPath+"/"//数据接口
                            ,data:res.list
                            ,page: true //开启分页
                            ,limit:10
                            ,cellMinWidth: tablewidth
                            ,cols: [[ //表头
                                {type:'numbers', title: '序号',  align:'center'}
                                ,{field: 'ydh', title: '运单号' ,align:'center'}
                                 ,{field: 'ydzt',templet:'#ydztfix' ,title: '运单状态',align:'center'}

                                ,{field: 'khjc', title: '客户简称' ,  align:'center'}

                                ,{field: 'qymc', title: '区域名称' ,  align:'center'}
                                ,{field: 'xlmc', title: '线路名称' ,  align:'center'}
                                ,{field: 'ydrq', title: '运单日期' ,align:'center'}
                                ,{field: 'bzrq', title: '报账日期' ,align:'center'}
                                ,{field:'cph',templet: '#selectTpl_type', title: '车牌号' ,align:'center',event: 'cph' , }
                                ,{field: 'cllx', title: '车辆类型' ,align:'center'}
                                ,{field: 'jsyxm', title: '驾驶员' ,align:'center'}
                                ,{field: 'jsysj', title: '驾驶员手机' ,align:'center'}
                                ,{field: 'zcsx', title: '支出上限' ,align:'center'}
                                ,{field: 'zsr', title: '总收入' ,align:'center'}
                                ,{field: 'zzc', title: '总支出' ,align:'center',templet:"#zzc"}
                                ,{ title:'操作', align:'center', toolbar: '#opera',width:150}
                            ]]
                        });
                    }
                });
            }
        });


    });





</script>
</body>
</html>